<?php
include 'Model/Model.php';
$model = new \Model\Model();
//
//$model->query('CREATE TABLE `tbUsers` (
//  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT \'用户id号\',
//  `username` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT \'用户名\',
//  `password` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT \'密码\',
//  `nickname` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT \'最后签到日期\',
//  `desc` varchar(1024) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT \'个人简介\',
//  `last_login_time` date DEFAULT NULL COMMENT \'最后登录的日期\',
//  `error_count` tinyint NOT NULL DEFAULT \'0\' COMMENT \'登录密码输入错误次数\',
//  PRIMARY KEY (`id`),
//  UNIQUE KEY `tbusers_username_unique` (`username`)
//) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;');
//
//
//$model->query('CREATE TABLE `tbSessions` (
//  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT \'用户id号\',
//  `session` char(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT \'用户session\',
//  `uid` int unsigned NOT NULL COMMENT \'用户id号\',
//  `session_expire_time` timestamp NOT NULL COMMENT \'该session过期时间\',
//  PRIMARY KEY (`id`),
//  UNIQUE KEY `tbsessions_session_unique` (`session`)
//) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;');
//
//
//$model->query('CREATE TABLE `tbCdKey` (
//  `id` smallint unsigned NOT NULL AUTO_INCREMENT,
//  `uid` int unsigned NOT NULL COMMENT \'发帖用户id号\',
//  `no` char(32) COLLATE utf8mb4_unicode_ci NOT NULL,
//  PRIMARY KEY (`id`),
//  UNIQUE KEY `tbcdkey_no_unique` (`no`)
//) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;');
//
//
//$model->query('CREATE TABLE `tbArticles` (
//  `id` int unsigned NOT NULL AUTO_INCREMENT,
//  `article` varchar(2048) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT \'帖子的内容\',
//  `uid` int unsigned NOT NULL COMMENT \'发帖用户id号\',
//  PRIMARY KEY (`id`)
//) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;');

for ($i=0;$i<2000;$i++){
    $uid = md5(uniqid());
    $redis = new \Redis();
    $redis->connect('127.0.0.1', 6379);
    $redis->lpush('cdkey',$uid);
    echo '111';
}
